const timeline = [
    {
        day: 0,
        text: "凤仙花的种子很小，呈圆形状，颜色是深黑色的，上面有着白白的绒毛。\n发芽的成功率特别高，将种子播种到土壤里，大概一周就可以生根发芽了。",
        image: "./image/Zoom/Zoom-0.webp",
    },
    {
        day: 5,
        image: "./image/Zoom/Zoom-1.webp",
        text: "凤仙花萌发了。",
    },
    {
        day: 10,
        image: "./image/Zoom/Zoom-2.webp",
        text: "这是凤仙花的第一对叶子——子叶。\n子叶淡绿色，椭圆形，表面光滑、无明显叶脉。\n在风仙花种子萌发的过程中，子叶的作用是提供营养。",
    },
    {
        day: 15,
        image: "./image/Zoom/Zoom-3.webp",
        text: "凤仙花长出真叶，真叶是风仙花真正的叶子。\n真叶椭圆形，边缘锯齿状，淡绿色，有明显的叶脉。",
    },
    {
        day: 35,
        image: "./image/Zoom/Zoom-4.webp",
        text: "凤仙花的叶子展开、交叉生长是为了最大限度的接受阳光的照射。",
    },
    {
        day: 50,
        image: "./image/Zoom/Zoom-5.webp",
        text: "凤仙花叶子与茎之间长出了花蕾。\n凤仙花出现花蕾时,植株就不再长高或者增长缓慢了。",
    },
    {
        day: 55,
        image: "./image/Zoom/Zoom-6.webp",
        text: "凤仙花的萼片是有尖角、弯曲的。",
    },
    {
        day: 60,
        image: "./image/Zoom/Zoom-7.webp",
        text: "凤仙花的花朵形状像蝴蝶，有多种颜色，常见的是红色。\n凤仙花的花瓣还可以用来染指甲。",
    },
    {
        day: 70,
        image: "./image/Zoom/Zoom-8.webp",
        text: "凤仙花盛开后开始凋谢。\n花的一部分逐渐发育，长出果实。",
    },
    {
        day: 85,
        image: "./image/Zoom/Zoom-9.webp",
        text: "凤仙花的果实椭圆形，绿色，外面有白色的茸毛。果实成熟后会变成黄色。",
    },
    {
        day: 100,
        image: "./image/Zoom/Zoom-10.webp",
        text: "凤仙花的果实里面包裹着种子。\n轻轻碰下凤仙花成熟的果实，里面的种子会被弹射出来。",
    },
];
export default function Look(day) {
    const total = day || Record.stack.day + Record.nowState.day;
    const { image, text } = timeline.reduce((col, i) => {
        return total >= i.day ? i : col;
    }, {});
    console.log(image);
    if (image) {
        Swal.fire({
            title: "观察结果",
            text,
            imageUrl: image,
            imageHeight: 300,
            confirmButtonText: "确认",
        });
    }
}
